package chapter04.Example14;

import com.sun.org.apache.bcel.internal.generic.NEW;

abstract class Animal{
    abstract void shout();
}
class Cat extends Animal{
    public void shout(){
        System.out.println("喵喵喵喵");
    }
}
class Dog extends Animal{
    public void shout(){
        System.out.println("汪汪汪汪");
    }
}
public class Example14 {
    public static void main(String[] args){
        Animal an1 =new Cat();
        Animal an2 = new Dog();
         an1.shout();
         an2.shout();
    }
}
